import request from '@/utils/request'
import qs from 'qs'

// 查询订单页数
export function order(data) {
  return request({
    url: '/order',
    method: 'post',
    data: qs.stringify(data)
  })
}
// 后台快车订单查询
export function orderexpress(data) {
  return request({
    url: '/orderexpress',
    method: 'post',
    data: qs.stringify(data)
  })
}
// 后台出租车订单
export function orderetaxi(data) {
  return request({
    url: '/orderetaxi',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 删除订单
export function uporderstart(data) {
  console.log(data, 40)
  return request({
    url: '/uporderstart',
    method: 'post',
    data: qs.stringify(data)
  })
}

// 取消订单
export function lockOrder(orderId) {
  console.log(orderId, 42)
  return request({
    url: '/lockOrder',
    method: 'get',
    params: {
      orderId
    }
  })
}

// 退款的方法
export function refundMoney(userId, price, orderId, driverId) {
  return request({
    url: '/refundMoney',
    method: 'get',
    params: {
      orderId,
      userId,
      price,
      driverId
    }
  })
}

// 提现的方法
export function checkDeposit(userId, price, orderId, driverId) {
  return request({
    url: '/checkDeposit',
    method: 'get',
    params: {
      orderId,
      userId,
      price,
      driverId
    }
  })
}